package com.data.springbootdynamicdata.service.impl;

import com.data.springbootdynamicdata.config.SetTargetDateSource;
import com.data.springbootdynamicdata.domain.Test;
import com.data.springbootdynamicdata.mapper.TestMapper;
import com.data.springbootdynamicdata.service.DataSourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/***
 *  Created with IntelliJ IDEA.
 *  Author:  wenlin
 *  Date:  2018/6/21 13:42
 *  Description:
 **/
@Service
public class DataSourceServiceImpl implements DataSourceService{

    @Autowired
    private TestMapper testMapper;

    @SetTargetDateSource
    @Override
    public List<Test> getDes(String source) {
        return testMapper.getDes();
    }
}
